package com.aaa.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * @author ：晋升（js20020923@qq.com）
 * @date ：Created in 2023/3/7 21:16
 * @description：
 * @modified By：
 * @version:
 */
@Data
@TableName(value = "emp")
public class Emp implements Serializable {
    @TableId(value = "empNo",type = IdType.AUTO)
    private Integer empno;
    private String ename;
    private String job;
    private Integer mgr;
    @JsonFormat(pattern = "yyyy-MM-dd",timezone = "GMT+8")
    private Data hiredate;
    //不要使用double float 因为他会产生精度丢失问题
    private BigDecimal sal;
    private BigDecimal comm;
    private Integer deptno;
    //关联的部门对象 多对一
    @TableField(exist = false)
    private Dept dept;
}

